Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODPart


RequestEmbeddedFrame

The RequestEmbeddedFrame method should create a new display frame for the specified embedded part.

ODFrame RequestEmbeddedFrame (in ODFrame containingFrame,
                              in ODFrame baseFrame, 
                              in ODShape frameShape,
                              in ODPart embedPart,
                              in ODTypeToken viewType,
                              in ODTypeToken presentation,
                              in ODBoolean isOverlaid);
containingFrame
A reference to a display frame in which to embed the new frame.
baseFrame
A reference to a sibling frame of the frame to be created, and also a reference to a display frame for the embedded part.
frameShape
A reference to a requested shape for the new frame, expressed in the frame coordinates of the containing frame.
embedPart
A reference to a part that is to be displayed in the new frame.
viewType
A tokenized string representing the view type to assign to this part's frame.
presentation
A tokenized string representing the presentation to assign to this part's frame.
isOverlaid
kODTrue if this part's frame is to be an overlaid frame, otherwise kODFalse.
return value
A reference to a new frame object.
DISCUSSION
The viewType parameter must be the tokenized form of one of the view-type constants (kODViewAsFrame, kODViewAsSmallIcon, kODViewAsLargeIcon, or kODViewAsThumbnail). You can call the session object's Tokenize method to obtain a token corresponding to one of these constants.

An embedded part calls its containing part's RequestEmbeddedFrame method when it needs an extra frame to flow content into, for example, an additional column or additional page of text. The part must specify one of its current display frames as a base frame; the new frame is a sibling of the base frame, and it is in the same group as the base frame.

If your part supports embedding, it may need to respond to a request to add an embedded frame. Your part's RequestEmbeddedFrame method should call your draft's CreateFrame method to create the new frame and then return it to the embedded part.

Before returning the frame object, your part's RequestEmbeddedFrame method should call the frame object's Acquire method. When the caller has finished using the returned frame object, it should call the frame object's Release method.

OVERRIDING
When you subclass ODPart, you can override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely. This method needs to be implemented only by container parts.

EXCEPTIONS
kODErrCannotEmbed
This part does not support embedding.
kODErrInvalidFrame
The specified sibling frame is not an embedded frame of this part.
kODErrOutOfMemory
There is not enough memory to embed a part.
SEE ALSO
The ODTypeToken type (page 877).
The ODDraft::CreateFrame method (page 163).
The ODSession::Tokenize method (page 622).
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"Requesting an Additional Display Frame" on page 109 in OpenDoc Programmer's Guide.
"Adding an Embedded Frame on Request" on page 119 in OpenDoc Programmer's Guide.
For more information on frame negotiation, see the layout and embedding chapter in the OpenDoc Programmer's Guide for the MacOS.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help